<?php
class Control_Cdk_selectCdkType {
	function selectCdkType() {
		$cdkType = MooForm::request("cdkType");
		$nowGame = $game 	 = MooForm::request("game");
		
		$game = MooObj::get('Game')->transportGame($game);
		
	 	$cdkUrl = MooConfig::get('main.cdkUrl');
	 	
	 	// cdk下载url
	 	$cdkDownloadUrl = MooConfig::get('main.cdkDownloadUrl');
	 	MooView::set('cdkDownloadUrl', $cdkDownloadUrl);
	 	
	 	if($cdkType) {
	 		$type = "selectByType";
	 		$useCdkUrl = $cdkUrl . "/" . "query_type?" . "game=" . $game . "&type=" . $cdkType;
	 	} else {
	 		$type = "selectByGame";	
	 		$useCdkUrl = $cdkUrl . "/" . "query_type?" . "game=" . $game;
	 	}
	 	
		$res = MooUtil::curl_send($useCdkUrl);
//	 	$res = '{"p7":"game=wo&platform=&type=p7&reward=10000_1002_300000,30000_90001_2,30000_90009_1&createtime=20150110182844&starttime=20150105000000&endtime=20150228000000","p6":"game=wo&platform=&type=p6&reward=10000_1001_80,10000_1002_100000,30000_41001_2,30000_50001_1&createtime=20150107155029&starttime=20150105000000&endtime=20150228000000","p5":"game=wo&platform=&type=p5&reward=10000_1001_100,10000_1002_200000,30000_90005_1&createtime=20150107114029&starttime=20150105000000&endtime=20150228000000","p4":"game=wo&platform=&type=p4&reward=10000_1001_100,10000_1002_100000,30000_90003_3&createtime=20150105170020&starttime=20150105000000&endtime=20150228000000","xi":"game=wo&platform=&type=xi&reward=10000_1001_50,10000_1002_100000&createtime=20140826150510&starttime=2014-08-26&endtime=2014-08-27","p3":"game=wo&platform=&type=p3&reward=10000_1001_80,10000_1002_100000,30000_90003_3&createtime=20150105163246&starttime=20150105000000&endtime=20150228000000","h8":"game=wo&platform=&type=h8&reward=10000_1001_50,10000_1002_300000,30000_30001_2&createtime=20141022165602&starttime=20141021000000&endtime=20141031000000","p2":"game=wo&platform=&type=p2&reward=10000_1001_1000&createtime=20150105142425&starttime=20150105000000&endtime=20150331000000","h9":"game=wo&platform=&type=h9&reward=10000_1001_100,10000_1002_500000,30000_30001_5,30000_41002_3&createtime=20141022165905&starttime=20141021000000&endtime=20141031000000","p1":"game=wo&platform=&type=p1&reward=10000_1001_500&createtime=20150105142351&starttime=20150105000000&endtime=20150331000000","p9":"game=wo&platform=&type=p9&reward=10000_1001_100,10000_1002_150000,30000_41002_1&createtime=20150113190841&starttime=20150105000000&endtime=20150228000000","p8":"game=wo&platform=&type=p8&reward=10000_1002_3000000,30000_90008_5,30000_90001_5,30000_50003_10&createtime=20150113150503&starttime=20150105000000&endtime=20150228000000","h5":"game=wo&platform=&type=h5&reward=10000_1001_50,10000_1002_150000,30000_50001_3&createtime=20141021180618&starttime=20141021000000&endtime=20141231000000","h4":"game=wo&platform=&type=h4&reward=10000_1002_1&createtime=20141021155343&starttime=20141021000000&endtime=20141231000000","h7":"game=wo&platform=&type=h7&reward=10000_1001_50,10000_1002_100000,30000_41001_3&createtime=20141022143017&starttime=20141022000000&endtime=20141231000000","h6":"game=wo&platform=&type=h6&reward=10000_1001_100,10000_1002_100000,30000_41002_1&createtime=20141021185833&starttime=20141021000000&endtime=20141231000000","h1":"game=wo&platform=&type=h1&reward=10000_1001_100,10000_1002_50000,30000_41001_1&createtime=20141021142350&starttime=20141021000000&endtime=20141231000000","h3":"game=wo&platform=&type=h3&reward=10000_1002_1&createtime=20141021151602&starttime=20141021000000&endtime=20141231000000","h2":"game=wo&platform=&type=h2&reward=10000_1001_500,10000_1002_3000000,30000_90001_10,30000_41002_10,30000_50003_10&createtime=20141021143240&starttime=20141021000000&endtime=20141130000000","q6":"game=wo&platform=&type=q6&reward=10000_1001_80,10000_1002_150000&createtime=20150124190012&starttime=20150115000000&endtime=20150228000000","q5":"game=wo&platform=360&type=q5&reward=10000_1001_80,10000_1002_100000,30000_50001_1,30000_41001_2&createtime=20150124185508&starttime=20150115000000&endtime=20150228000000","q8":"game=wo&platform=&type=q8&reward=10000_1001_80,10000_1002_120000,30000_50002_1&createtime=20150127110419&starttime=20150115000000&endtime=20150228000000","q7":"game=wo&platform=&type=q7&reward=10000_1001_80,10000_1002_100000,30000_50001_2&createtime=20150126191204&starttime=20150115000000&endtime=20150228000000","q2":"game=wo&platform=&type=q2&reward=10000_1001_100,10000_1002_150000,30000_50003_1,30000_41001_3&createtime=20150117174237&starttime=20150115000000&endtime=20150228000000","q1":"game=wo&platform=&type=q1&reward=10000_1001_100,10000_1002_200000,30000_90008_1&createtime=20150115171424&starttime=20150115000000&endtime=20150228000000","q4":"game=wo&platform=&type=q4&reward=10000_1001_80,10000_1002_100000,30000_41001_3&createtime=20150121161103&starttime=20150115000000&endtime=20150331000000","i9":"game=wo&platform=&type=i9&reward=10000_1001_100,10000_1002_100000,30000_41002_1,30000_30001_1,30000_50001_2&createtime=20141024155001&starttime=20141024000000&endtime=20141231000000","q3":"game=wo&platform=&type=q3&reward=10000_1001_80,10000_1002_100000,30000_50001_1,30000_41001_2&createtime=20150121104508&starttime=20150115000000&endtime=20150331000000","q9":"game=wo&platform=&type=q9&reward=10000_1001_80,10000_1002_100000,30000_50001_1,30000_41001_2&createtime=20150127104259&starttime=20150115000000&endtime=20150331000000","1":"game=wo&platform=&type=1&reward=1&createtime=20141021152602&starttime=&endtime=","i8":"game=wo&platform=&type=i8&reward=10000_1001_100,10000_1002_100000,30000_41002_1,30000_50001_2&createtime=20141024154758&starttime=20141024000000&endtime=20141231000000","i7":"game=wo&platform=&type=i7&reward=10000_1001_80,10000_1002_150000,30000_41001_3&createtime=20141024154559&starttime=20141024000000&endtime=20141231000000","i6":"game=wo&platform=&type=i6&reward=10000_1001_100,10000_1002_500000,30000_41002_3,30000_50003_3&createtime=20141024150346&starttime=20141024000000&endtime=20141231000000","i5":"game=wo&platform=&type=i5&reward=10000_1001_50,10000_1002_150000,30000_41001_2&createtime=20141023200921&starttime=20141023000000&endtime=20150123000000","r1":"game=wo&platform=&type=r1&reward=10000_1001_66,10000_1002_120000,30000_50002_1&createtime=20150128104301&starttime=20150115000000&endtime=20150331000000","i4":"game=wo&platform=&type=i4&reward=10000_1001_50,10000_1002_100000,30000_41001_3&createtime=20141023200812&starttime=20141023000000&endtime=20141231000000","i3":"game=wo&platform=&type=i3&reward=10000_1001_800,10000_1002_3000000,30000_30001_5,30000_41002_10,30000_90001_10,30000_10001_10&createtime=20141022170739&starttime=20141021000000&endtime=20141031000000","i2":"game=wo&platform=&type=i2&reward=10000_1001_400,10000_1002_2000000,30000_30001_5,30000_41002_5,30000_90001_6&createtime=20141022170255&starttime=20140924000000&endtime=20141031000000","i1":"game=wo&platform=&type=i1&reward=10000_1001_200,10000_1002_1000000,30000_30001_5,30000_41002_3,30000_90001_2&createtime=20141022170115&starttime=20141021000000&endtime=20141031000000","n1":"game=wo&platform=apps&type=n1&reward=10000_1001_66,10000_1002_100000,30000_41001_2&createtime=20141201143429&starttime=20141201000000&endtime=20150131000000","f6":"game=wo&platform=meizu&type=f6&reward=10000_1001_50,10000_1002_100000,30000_41001_2&createtime=20141017181657&starttime=20141017000000&endtime=20141231000000","f7":"game=wo&platform=37wan&type=f7&reward=10000_1001_50,10000_1002_100000,30000_41001_2&createtime=20141017181836&starttime=20141017000000&endtime=20141231000000","f8":"game=wo&platform=meizu&type=f8&reward=10000_1001_100,10000_1002_500000,30000_41002_3&createtime=20141017181941&starttime=20141017000000&endtime=20141231000000","f9":"game=wo&platform=37wan&type=f9&reward=10000_1001_100,10000_1002_500000,30000_41002_3&createtime=20141017182211&starttime=20141017000000&endtime=20141231000000","n5":"game=wo&platform=&type=n5&reward=10000_1001_100,10000_1002_150000,30000_41001_5,30000_50002_2,30000_30001_2&createtime=20141203112502&starttime=20141201000000&endtime=20150331000000","n4":"game=wo&platform=&type=n4&reward=10000_1001_100,10000_1002_120000,30000_50003_1,30000_30002_1&createtime=20141203111328&starttime=20141201000000&endtime=20150331000000","n3":"game=wo&platform=&type=n3&reward=10000_1001_60,10000_1002_100000,30000_41001_2,30000_50001_1&createtime=20141201155932&starttime=20141201000000&endtime=20150131000000","n2":"game=wo&platform=&type=n2&reward=10000_1001_66,10000_1002_120000,30000_41001_2,30000_50001_1&createtime=20141201153355&starttime=20141201000000&endtime=20150131000000","n9":"game=wo&platform=360&type=n9&reward=10000_1001_100,10000_1002_150000,30000_41001_3&createtime=20141210140119&starttime=20141201000000&endtime=20150331000000","n8":"game=wo&platform=&type=n8&reward=10000_1001_80,10000_1002_150000,30000_41001_5&createtime=20141210103842&starttime=20141201000000&endtime=20150131000000","n7":"game=wo&platform=&type=n7&reward=10000_1001_100,10000_1002_100000,30000_50001_2&createtime=20141203152410&starttime=20141201000000&endtime=20150131000000","n6":"game=wo&platform=&type=n6&reward=10000_1001_66,10000_1002_120000,30000_50002_1&createtime=20141203121047&starttime=20141201000000&endtime=20150331000000","12":"game=wo&platform=&type=12&reward=20141231000000&createtime=20150116154440&starttime=20141021000000&endtime=20141231000000","a9":"game=wo&platform=&type=a9&reward=10000_1001_80,10000_1002_30000,30000_60001_5,&createtime=20140902093827&starttime=20140901000000&endtime=20141130000000","a1":"game=cb&platform=&type=a1&reward=10000_1002_10000,10000_1001_1000&createtime=20141231121301&starttime=20141231000000&endtime=20150101000000","a2":"game=cb&platform=&type=a2&reward=30000_10001_5,40000_1010005_1&createtime=20141231121539&starttime=20141231000000&endtime=20150101000000","f1":"game=wo&platform=&type=f1&reward=10000_1011_500,10000_1002_3000000,30000_90001_3&createtime=20141013194349&starttime=20141013000000&endtime=20141231000000","a3":"game=cb&platform=&type=a3&reward=10000_1001_200,10000_1002_200000,&createtime=20141231181916&starttime=20150101000000&endtime=20150116000000","a4":"game=cb&platform=&type=a4&reward=10000_1001_200,10000_1002_100000&createtime=20150106114218&starttime=20150106000000&endtime=20150116000000","f3":"game=wo&platform=youku&type=f3&reward=10000_1001_100,10000_1002_10000&createtime=20141014153349&starttime=20141014000000&endtime=20141231000000","a5":"game=cb&platform=&type=a5&reward=10000_1002_100000,30000_41001_3&createtime=20150107181701&starttime=20150101000000&endtime=20160101000000","f2":"game=wo&platform=&type=f2&reward=10000_1001_100,10000_1002_100000,30000_41002_1&createtime=20141014113036&starttime=20141014000000&endtime=20141231000000","a6":"game=cb&platform=&type=a6&reward=10000_1001_888,30000_50003_18,10000_1002_1000000,&createtime=20150107200845&starttime=20150107000000&endtime=20150118000000","f5":"game=wo&platform=&type=f5&reward=10000_1001_50,10000_1002_100000&createtime=20141016163801&starttime=20141016000000&endtime=20141231000000","a7":"game=wo&platform=&type=a7&reward=10000_1001_30,10000_1002_20000,&createtime=20140902093112&starttime=20140901000000&endtime=20150901000000","f4":"game=wo&platform=&type=f4&reward=10000_1001_50.10000_1002_100000&createtime=20141016153918&starttime=20141014000000&endtime=20141231000000","a8":"game=wo&platform=uc&type=a8&reward=10000_1001_50,10000_1002_20000,30000_41001_2,&createtime=20140902093512&starttime=20140901000000&endtime=20141130000000","g9":"game=wo&platform=&type=g9&reward=10000_1001_50,10000_1002_150000,30000_41001_2&createtime=20141021142303&starttime=20141021000000&endtime=20141231000000","o2":"game=wo&platform=&type=o2&reward=10000_1001_80,10000_1002_150000,30000_90003_3&createtime=20141215181605&starttime=20141215000000&endtime=20150131000000","g7":"game=wo&platform=&type=g7&reward=10000_1001_100,10000_1002_50000,30000_41001_1&createtime=20141021122952&starttime=20141021000000&endtime=20150131000000","o1":"game=wo&platform=&type=o1&reward=10000_1001_80,10000_1002_141212&createtime=20141210140326&starttime=20141201000000&endtime=20141231000000","g8":"game=wo&platform=&type=g8&reward=10000_1001_50,10000_1002_100000,30000_41001_3&createtime=20141021142209&starttime=20141021000000&endtime=20141231000000","o4":"game=wo&platform=&type=o4&reward=10000_1001_80,10000_1002_141225&createtime=20141219121553&starttime=20141215000000&endtime=20150131000000","o3":"game=wo&platform=sina&type=o3&reward=10000_1001_80,10000_1002_100000,30000_41001_3&createtime=20141217202059&starttime=20141215000000&endtime=20150119000000","o6":"game=wo&platform=&type=o6&reward=10000_1001_80,10000_1002_100000,30000_50001_2&createtime=20150104142830&starttime=20150104000000&endtime=20150228000000","o5":"game=wo&platform=&type=o5&reward=10000_1001_200,10000_1002_200000,30000_90006_1&createtime=20141225144447&starttime=20141225000000&endtime=20150228000000","o8":"game=wo&platform=&type=o8&reward=10000_1001_200&createtime=20150105142228&starttime=20150105000000&endtime=20150331000000","o7":"game=wo&platform=&type=o7&reward=10000_1001_100&createtime=20150105142141&starttime=20150105000000&endtime=20150331000000","o9":"game=wo&platform=&type=o9&reward=10000_1001_300&createtime=20150105142308&starttime=20150105000000&endtime=20150331000000","nb":"game=wo&platform=&type=nb&reward=10000_1001_100&createtime=20140812143741&starttime=20140812000000&endtime=20140815000000","g2":"game=wo&platform=&type=g2&reward=10000_1001_50,10000_1002_200000,30000_41001_5&createtime=20141017195938&starttime=20141017000000&endtime=20141231000000","g1":"game=wo&platform=&type=g1&reward=10000_1001_50,10000_1002_100000&createtime=20141017195746&starttime=20141017000000&endtime=20141231000000","g6":"game=wo&platform=&type=g6&reward=10000_1001_50,10000_1002_150000,30000_40001_2&createtime=20141021122900&starttime=20141021000000&endtime=20150131000000","g5":"game=wo&platform=&type=g5&reward=10000_1001_50,10000_1002_100000,30000_40001_3&createtime=20141021122825&starttime=20141021000000&endtime=20150131000000","g4":"game=wo&platform=&type=g4&reward=10000_1001_100,10000_1002_100000,30000_41002_1&createtime=20141021105446&starttime=20141021000000&endtime=20141231000000","g3":"game=wo&platform=&type=g3&reward=10000_1001_50,10000_1002_100000,30000_41001_3&createtime=20141021105011&starttime=20141021000000&endtime=20141231000000","l8":"game=wo&platform=&type=l8&reward=10000_1001_1000&createtime=20141111155252&starttime=20141111000000&endtime=20141115000000","l9":"game=wo&platform=&type=l9&reward=10000_1001_100,10000_1002_200000,30000_50003_2&createtime=20141112105545&starttime=20141112000000&endtime=20151112000000","l6":"game=wo&platform=&type=l6&reward=10000_1001_100&createtime=20141111154613&starttime=20141111000000&endtime=20141115000000","l7":"game=wo&platform=&type=l7&reward=10000_1001_300&createtime=20141111155047&starttime=20141111000000&endtime=20141115000000","l4":"game=wo&platform=&type=l4&reward=10000_1001_100&createtime=20141110143345&starttime=20141110000000&endtime=20141115000000","l5":"game=wo&platform=&type=l5&reward=10000_1001_100,10000_1002_500000,30000_50002_3,30000_30001_2,30000_41002_1,30000_41001_5&createtime=20141111152620&starttime=20141111000000&endtime=20150630000000","d9":"game=wo&platform=&type=d9&reward=10000_1002_500000,30000_90001_3,30000_41002_2&createtime=20140925215621&starttime=20140916000000&endtime=20141231000000","l2":"game=wo&platform=&type=l2&reward=10000_1001_99,10000_1002_115811&createtime=20141108181424&starttime=20141108000000&endtime=20141131000000","d8":"game=wo&platform=htc&type=d8&reward=10000_1002_300000,30000_41002_3&createtime=20140924165642&starttime=20140924000000&endtime=20141031000000","l3":"game=wo&platform=&type=l3&reward=10000_1001_99,10000_1002_115811,30000_41001_3&createtime=20141110110107&starttime=20141110000000&endtime=20141131000000","l1":"game=wo&platform=&type=l1&reward=10000_1001_80,10000_1002_100000,30000_41002_1&createtime=20141108181240&starttime=20141108000000&endtime=20141231000000","d5":"game=wo&platform=&type=d5&reward=10000_1002_30000,30000_41002_3,30000_90001_2&createtime=20140924124123&starttime=20140924000000&endtime=20141031000000","d4":"game=wo&platform=&type=d4&reward=10000_1001_60,10000_1002_30000,30000_41001_3&createtime=20140920230744&starttime=20140920000000&endtime=20141231000000","d7":"game=wo&platform=&type=d7&reward=10000_1002_300000,30000_41002_3,30000_90001_2&createtime=20140924124802&starttime=20140924000000&endtime=20141031000000","d6":"game=wo&platform=&type=d6&reward=10000_1002_300000,30000_41002_3,30000_90001_2&createtime=20140924124340&starttime=20140924000000&endtime=20141013000000","d1":"game=wo&platform=&type=d1&reward=10000_1001_50,10000_1002_50000&createtime=20140917175918&starttime=20140917000000&endtime=20141231000000","d2":"game=wo&platform=&type=d2&reward=10000_1001_60,10000_1002_50000,30000_41001_2&createtime=20140917180311&starttime=20140917000000&endtime=20141231000000","d3":"game=wo&platform=&type=d3&reward=10000_1001_80,10000_1002_30000,30000_50002_2&createtime=20140917180427&starttime=20140917000000&endtime=20141231000000","m9":"game=wo&platform=&type=m9&reward=10000_1001_50,10000_1002_100000,30000_41001_3&createtime=20141127190751&starttime=20141127000000&endtime=20141231000000","m5":"game=wo&platform=&type=m5&reward=10000_1001_80,10000_1002_141127,30000_41001_5&createtime=20141121110512&starttime=20141121000000&endtime=20141231000000","m6":"game=wo&platform=37wan&type=m6&reward=10000_1001_50,10000_1002_100000,30000_41001_3&createtime=20141127103707&starttime=20141127000000&endtime=20150228000000","m7":"game=wo&platform=&type=m7&reward=10000_1001_50,10000_1002_100000,30000_41001_3&createtime=20141127114302&starttime=20141127000000&endtime=20150228000000","m8":"game=wo&platform=&type=m8&reward=10000_1001_80,10000_1002_120000,30000_41001_2,30000_50001_1&createtime=20141127154404&starttime=20141127000000&endtime=20141231000000","m1":"game=wo&platform=&type=m1&reward=10000_1001_300,10000_1002_300000,30000_90001_2&createtime=20141112105952&starttime=20141112000000&endtime=20151231000000","m2":"game=wo&platform=360&type=m2&reward=10000_1001_100,10000_1002_150000,30000_50001_3&createtime=20141113113131&starttime=20141113000000&endtime=20141231000000","m3":"game=wo&platform=uc&type=m3&reward=10000_1001_66,10000_1002_100000,30000_41001_2&createtime=20141113172129&starttime=20141113000000&endtime=20141231000000","e9":"game=wo&platform=&type=e9&reward=10000_1001_50,10000_1002_100000,30000_41001_3&createtime=20140929175752&starttime=20140929000000&endtime=20141231000000","m4":"game=wo&platform=&type=m4&reward=10000_1001_66,10000_1002_150000,30000_41001_3,30000_50001_1&createtime=20141119145844&starttime=20141119000000&endtime=20141231000000","e8":"game=wo&platform=&type=e8&reward=10000_1001_200,10000_1002_100000&createtime=20140929160603&starttime=20140928000000&endtime=20141031000000","e7":"game=wo&platform=360&type=e7&reward=10000_1002_300000,30000_41001_5,30000_50002_2,30000_30001_2&createtime=20140929121204&starttime=20140928000000&endtime=20141031000000","e6":"game=wo&platform=&type=e6&reward=10000_1002_500000,30000_90001_3,30000_41002_2&createtime=20140928185448&starttime=20140928000000&endtime=20141028000000","e5":"game=wo&platform=&type=e5&reward=10000_1001_50,10000_1002_100000&createtime=20140928185124&starttime=20140928000000&endtime=20141028000000","e3":"game=wo&platform=&type=e3&reward=10000_1001_300,10000_1002_300000,30000_90001_2&createtime=20140926153557&starttime=20140924000000&endtime=20150930000000","e4":"game=wo&platform=&type=e4&reward=10000_1001_50,10000_1002_100000&createtime=20140928185041&starttime=20140928000000&endtime=20141028000000","e1":"game=wo&platform=&type=e1&reward=10000_1001_50,10000_1002_100000&createtime=20140925215821&starttime=20140916000000&endtime=20141231000000","e2":"game=wo&platform=&type=e2&reward=10000_1001_60,10000_1002_100000,30000_41002_2&createtime=20140926152836&starttime=20140924000000&endtime=20141130000000","t4":"game=wo&platform=&type=t4&reward=10000_1002_1&createtime=20141021165928&starttime=20141021000000&endtime=20141231000000","t5":"game=wo&platform=&type=t5&reward=10000_1002_1&createtime=20141021170325&starttime=20141021000000&endtime=20141231000000","t6":"game=wo&platform=&type=t6&reward=10000_1002_1&createtime=20141021171524&starttime=20141021000000&endtime=20141231000000","t7":"game=wo&platform=&type=t7&reward=10000_1001_50,10000_1002_100000&createtime=20150107140008&starttime=20150105000000&endtime=20150228000000","t8":"game=wo&platform=&type=t8&reward=10000_1001_20000,10000_1005_10,10000_1002_1000000&createtime=20150107145511&starttime=20150105000000&endtime=20150109000000","j4":"game=wo&platform=&type=j4&reward=10000_1001_50,10000_1002_150000,30000_41001_2&createtime=20141028174233&starttime=20141028000000&endtime=20141231000000","t2":"game=wo&platform=&type=t2&reward=10000_1002_1&createtime=20141021165232&starttime=20141021000000&endtime=20141231000000","j5":"game=wo&platform=&type=j5&reward=10000_1001_100,10000_1002_100000,30000_41001_2,30000_30001_1&createtime=20141030124345&starttime=20141030000000&endtime=20141231000000","t1":"game=wo&platform=&type=t1&reward=10000_1002_1&createtime=20141021161606&starttime=20141021000000&endtime=20141231000000","j2":"game=wo&platform=&type=j2&reward=10000_1002_1000000,30000_90001_5,30000_41001_20&createtime=20141025111301&starttime=20141025000000&endtime=20141231000000","j3":"game=wo&platform=&type=j3&reward=10000_1001_100,10000_1002_100000,30000_41002_1&createtime=20141028173940&starttime=20141028000000&endtime=20141231000000","j8":"game=wo&platform=&type=j8&reward=10000_1001_50,10000_1002_100000,30000_41001_3&createtime=20141031162942&starttime=20141031000000&endtime=20141231000000","j9":"game=wo&platform=uc&type=j9&reward=10000_1002_150000,30000_41001_2&createtime=20141104141255&starttime=20141104000000&endtime=20141131000000","j6":"game=wo&platform=&type=j6&reward=10000_1001_60,10000_1002_150000,30000_41001_3&createtime=20141031143152&starttime=20141031000000&endtime=20141231000000","j7":"game=wo&platform=&type=j7&reward=10000_1001_100,10000_1002_150000,30000_41002_1,30000_50001_2&createtime=20141031143451&starttime=20141031000000&endtime=20141231000000","b3":"game=wo&platform=&type=b3&reward=10000_1001_100,10000_1002_200000,&createtime=20140902165044&starttime=20140901000000&endtime=20141130000000","b2":"game=wo&platform=&type=b2&reward=10000_1001_100,10000_1002_100000,30000_50002_5&createtime=20140902164713&starttime=20140901000000&endtime=20150230000000","b5":"game=wo&platform=&type=b5&reward=10000_1001_60,10000_1002_50000,30000_30001_2&createtime=20140905143716&starttime=20140905000000&endtime=20141230000000","b4":"game=wo&platform=&type=b4&reward=10000_1001_50,10000_1002_50000,30000_41001_1,&createtime=20140903202448&starttime=20140903000000&endtime=20141110000000","b7":"game=wo&platform=&type=b7&reward=10000_1002_500000,30000_60001_150,30000_41002_5&createtime=20140911123131&starttime=20140911000000&endtime=20141231000000","j1":"game=wo&platform=&type=j1&reward=10000_1001_50,10000_1002_100000,30000_41001_3&createtime=20141024155459&starttime=20141024000000&endtime=20141231000000","b6":"game=wo&platform=&type=b6&reward=10000_1001_300,10000_1002_300000,30000_90001_2&createtime=20140909140925&starttime=20140909000000&endtime=20141010000000","b9":"game=wo&platform=&type=b9&reward=10000_1002_200000,30000_41001_5&createtime=20140925110642&starttime=20140924000000&endtime=20141031000000","b8":"game=wo&platform=&type=b8&reward=10000_1001_50,10000_1002_50000,30000_41001_3,&createtime=20140911182920&starttime=20140911000000&endtime=20141231000000","b1":"game=wo&platform=&type=b1&reward=10000_1001_50,10000_1002_50000,&createtime=20140902164000&starttime=20140901000000&endtime=20141001000000","s3":"game=wo&platform=&type=s3&reward=10000_1001_50,10000_1002_100000,30000_41001_2&createtime=20150203124808&starttime=20150115000000&endtime=20150331000000","k3":"game=wo&platform=&type=k3&reward=10000_1001_100,10000_1002_100000,30000_41001_3,30000_50001_2&createtime=20141104165804&starttime=20141104000000&endtime=20141231000000","k4":"game=wo&platform=&type=k4&reward=10000_1001_80,10000_1002_150000,30000_41002_1&createtime=20141104170436&starttime=20141104000000&endtime=20141231000000","k5":"game=wo&platform=&type=k5&reward=10000_1001_60,10000_1002_150000,30000_41001_2,30000_50001_1&createtime=20141105223737&starttime=20141105000000&endtime=20150131000000","s2":"game=wo&platform=&type=s2&reward=10000_1001_100,10000_1002_150000,30000_41002_2&createtime=20150203124709&starttime=20150115000000&endtime=20150331000000","k6":"game=wo&platform=&type=k6&reward=10000_1001_100&createtime=20141106215322&starttime=20141106000000&endtime=20141110000000","s1":"game=wo&platform=&type=s1&reward=10000_1001_80,10000_1002_120000,30000_50002_1&createtime=20150203124501&starttime=20150115000000&endtime=20150331000000","k7":"game=wo&platform=&type=k7&reward=10000_1001_50,10000_1002_100000,30000_41001_2&createtime=20141106220248&starttime=20141106000000&endtime=20141231000000","k8":"game=wo&platform=&type=k8&reward=10000_1001_100,10000_1002_150000,30000_41002_1&createtime=20141106220342&starttime=20141106000000&endtime=20141231000000","k9":"game=wo&platform=&type=k9&reward=10000_1001_50,10000_1002_100000,30000_41001_2&createtime=20141108181103&starttime=20141108000000&endtime=20141231000000","c6":"game=wo&platform=&type=c6&reward=10000_1001_50,10000_1002_100000&createtime=20140916235130&starttime=20140916000000&endtime=20141115000000","c5":"game=wo&platform=360&type=c5&reward=10000_1001_50,10000_1002_50000,30000_41001_2,30000_50002_2&createtime=20140916234738&starttime=20140916000000&endtime=20141231000000","c4":"game=wo&platform=91&type=c4&reward=10000_1002_500000,30000_90001_5,30000_41002_5&createtime=20140916120728&starttime=20140916000000&endtime=20141116000000","c3":"game=wo&platform=&type=c3&reward=10000_1002_500000,30000_90001_5,30000_41002_5&createtime=20140916115131&starttime=20140916000000&endtime=20141116000000","c9":"game=wo&platform=kyusr&type=c9&reward=10000_1001_50,10000_1002_50000,30000_50002_3&createtime=20140917162603&starttime=20140917000000&endtime=20141231000000","c8":"game=wo&platform=&type=c8&reward=10000_1001_50,10000_1002_100000&createtime=20140916235510&starttime=20140916000000&endtime=20141231000000","k1":"game=wo&platform=uc&type=k1&reward=10000_1001_100,10000_1002_300000,30000_50001_3&createtime=20141104141615&starttime=20141104000000&endtime=20141131000000","c7":"game=wo&platform=&type=c7&reward=10000_1001_50,10000_1002_30000,30000_50002_3&createtime=20140916235409&starttime=20140916000000&endtime=20141231000000","k2":"game=wo&platform=uc&type=k2&reward=10000_1001_500,10000_1002_1500000,30000_50003_2,30000_41002_3,30000_90001_5&createtime=20141104144442&starttime=20141104000000&endtime=20141131000000","c1":"game=wo&platform=&type=c1&reward=10000_1001_100,10000_1002_100000,30000_41001_3&createtime=20140913132000&starttime=20140913000000&endtime=20141013000000","c2":"game=wo&platform=&type=c2&reward=10000_1001_50,10000_1002_30000,30000_41001_1&createtime=20140915182144&starttime=20140915000000&endtime=20141115000000","r6":"game=wo&platform=&type=r6&reward=10000_1001_100,10000_1002_150000,30000_41002_2&createtime=20150129120242&starttime=20150115000000&endtime=20150331000000","r7":"game=wo&platform=&type=r7&reward=10000_1001_100,10000_1002_300000,30000_90008_1&createtime=20150129122634&starttime=20150115000000&endtime=20150331000000","r8":"game=wo&platform=kyusr&type=r8&reward=10000_1002_3000000,30000_90001_5,30000_50003_10,30000_41002_10&createtime=20150129153847&starttime=20150115000000&endtime=20150228000000","r9":"game=wo&platform=&type=r9&reward=10000_1001_50,10000_1002_500000,30000_41001_2&createtime=20150203123701&starttime=20150115000000&endtime=20150331000000","r2":"game=wo&platform=&type=r2&reward=10000_1001_80,10000_1002_150000&createtime=20150128104345&starttime=20150115000000&endtime=20150331000000","r3":"game=wo&platform=&type=r3&reward=10000_1001_80,10000_1002_300000,30000_90008_1&createtime=20150129115933&starttime=20150115000000&endtime=20150331000000","r4":"game=wo&platform=&type=r4&reward=10000_1001_50,10000_1002_100000,30000_41001_2&createtime=20150129120041&starttime=20150115000000&endtime=20150331000000","r5":"game=wo&platform=&type=r5&reward=10000_1001_80,10000_1002_120000,30000_50002_1&createtime=20150129120135&starttime=20150115000000&endtime=20150331000000","status":"0"}';
	 	$result = MooJson::decode($res, true);
		// 查询成功
		if($type == "selectByType" && $result && $result['status'] == 0) {
			$message = $result['type'];
			$createInfoArr = explode('&',$message); 
			// 该cdk信息
			$messArr = array();
			for($index = 0;$index < count($createInfoArr); $index++) { 
				 $info = $createInfoArr[$index];
				 $infoArr = explode('=',$info);
				 $messArr[$infoArr[0]] =  $infoArr[1];
			}
			
			// 设置查询结果
			MooView::set('platform2', $messArr['platform']);
			MooView::set('game2', $messArr['game']);
			MooView::set('type2', $messArr['type']);
			MooView::set('reward2', $messArr['reward']);
			MooView::set('createtime2', $messArr['createtime']);
			MooView::set('starttime2', $messArr['starttime']);
			MooView::set('endtime2', $messArr['endtime']);
			MooView::set('type', 0);
			
			MooView::set('nowGame', $nowGame);
			
			MooView::render('cdkUse');				
		} else if ($type == "selectByGame" && $result && $result['status'] == 0) {
			$messArrs  = array();
			foreach ($result as $type => $val) {
				if ($type != 'status') {
					$createInfoArr = explode('&',$val);
					for($index = 0;$index < count($createInfoArr); $index++) {
						$info = $createInfoArr[$index];
							 $infoArr = explode('=',$info);
							 $messArr[$infoArr[0]] =  $infoArr[1];
					}
					$messArrs[] = $messArr;
				}
			}
			
			MooView::set('type', 1);
			MooView::set('cdkInfo', $messArrs);
			MooView::set('nowGame', $nowGame);
			MooView::render('cdkUse');	
			
		} else {
			$errMsg = "数据不存在!";
			MooView::set('errorMsg2', $errMsg);
			MooView::render('cdkUse');
		}
	}
}